home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue72 / construc / MainForm.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2001-07-03  |  998 b   |  47 lines

  1. unit MainForm;
  2. interface
  3. uses
  4.   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  5.   Dialogs, Rio, SoapHTTPClient, StdCtrls, ExtCtrls;
  6.  
  7. type
  8.   TForm1 = class(TForm)
  9.     bntAnswer: TButton;
  10.     btnQuestion: TButton;
  11.     lbeAnswer: TLabeledEdit;
  12.     lbeQuestion: TLabeledEdit;
  13.     HTTPRIO1: THTTPRIO;
  14.     procedure bntAnswerClick(Sender: TObject);
  15.     procedure btnQuestionClick(Sender: TObject);
  16.   private
  17.     { Private declarations }
  18.   public
  19.     { Public declarations }
  20.   end;
  21.  
  22. var
  23.   Form1: TForm1;
  24.  
  25. implementation
  26. {$R *.dfm}
  27. uses
  28.   HitchHikerImport;
  29.  
  30. procedure TForm1.bntAnswerClick(Sender: TObject);
  31. var
  32.   HitchHiker: IHitchHiker;
  33. begin
  34.   HitchHiker := (HTTPRIO1 AS IHitchHiker);
  35.   lbeAnswer.Text := IntToStr(HitchHiker.TheAnswer)
  36. end;
  37.  
  38. procedure TForm1.btnQuestionClick(Sender: TObject);
  39. var
  40.   HitchHiker: IHitchHiker;
  41. begin
  42.   HitchHiker := (HTTPRIO1 AS IHitchHiker);
  43.   lbeQuestion.Text := HitchHiker.TheQuestion
  44. end;
  45.  
  46. end.
  47.